<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p>123</p>
<input type="text">
<script>
    const resolvedProm = Promise.resolve(33);

    let thenProm = resolvedProm.then(value => {
        console.log("this gets called after the end of the main stack. the value received and returned is: " + value);
        return value;
    });
    //
    console.log(thenProm);
    //
    //
    setTimeout(() => {
        console.log(thenProm);
    });
</script>
</body>
</html>